﻿package view.component
{
    import com.sh.game.global.*;
    import flash.display.*;
    import morn.core.components.*;
    import morn.core.handlers.*;

    public class TdResults extends Sprite
    {
        private var doShow:Boolean = false;
        private var img:Image;

        public function TdResults()
        {
            return;
        }// end function

        public function showResult(param1:String) : void
        {
            this.doShow = true;
            App.mloader3.loadSWF(Config.getUrl("assets/images/td/td_" + param1 + ".swf"), 1, new Handler(this.doCom, [param1]));
            return;
        }// end function

        public function doCom(param1:String, param2) : void
        {
            if (this.doShow)
            {
                var _loc_3:* = new Image("png.common.td_" + param1);
                this.img = new Image("png.common.td_" + param1);
                this.addChild(_loc_3);
            }
            return;
        }// end function

        public function removeResult() : void
        {
            if (this.img)
            {
                if (this.img.parent)
                {
                    this.removeChild(this.img);
                }
                this.img = null;
            }
            else
            {
                this.doShow = false;
            }
            return;
        }// end function

    }
}
